<!doctype html>
<html lang="zh-CN">
<head>
    <include file="include/head" title="{$_CFG.site.name}" />
</head>

<body>
	<div class="header-blank"></div>
    <div class="header">
		{$_CFG.site.name}
	</div>
	<notempty name="shop">
	<style>
		.personal{ position:relative;}
		.personal .img img{ width:100%;}
		.personal .headerimg{ position:absolute; bottom:10px; left:20px; width:100px; height:100px;}
		.personal .headerimg img{ width:100%; height:100%;  padding:5px; border:1px solid #ccc; background:#fff;}
		.personal .nickname{ position:absolute; bottom:70px; left: 140px; font-family:"微软雅黑"; color:#fff; font-size:20px; text-shadow:0px 0px 4px #2E2D2D;}
		.personal .nickname a{ color:inherit;}
		.nav{ padding-top:10px; padding-bottom:10px; padding-left:140px; border-bottom:1px solid #ccc;}
		.nav ul{ padding:0; margin:0; display:-webkit-box; display:box; list-style:none;}
		.nav ul li{ -webkit-box-flex:1.0; box-flex:1.0; list-style:none;}
		.nav ul li .top,.nav ul li .bottom{ display:block; text-align:center;}
		.nav ul li .top{ font-size:16px; font-weight:bold; color:#000;}
		.nav ul li .bottom{ color:#333;}
	</style>
	<div class="personal">
		<div class="img">
			<img src="__PUBLIC__/images/personal.jpg" />
		</div>
		<div class="nav">
			<ul>
				<li>
					<span class="top">{$all}</span>
					<span class="bottom">全部商品</span>
				</li>				
				<li>
					<a href="tel:{$shop.mobile}">
						<span class="top"><span class="glyphicon glyphicon-phone-alt"></span></span>
						<span class="bottom">联系客服</span>
					</a>
				</li>
				<li>
					<a href="{:U('qrcode')}">
						<span class="top"><span class="glyphicon glyphicon-qrcode"></span></span>
						<span class="bottom">二维码</span>
					</a>
				</li>
			</ul>
		</div>
		<div class="headerimg">
			<img src="{$shop.logo}" />
		</div>
		<div class="nickname">
			{$shop.name}
			<script>
			document.title = "{$shop.name}";
			</script>
			<if condition="$user['id'] eq $shop['id']"><a href="{:U('myshop')}"><span class="glyphicon glyphicon-pencil"></span></a></if>
		</div>
	</div>
	
	</notempty>
	
	<div class="banner">
		<style>
			.focus{ width:100%;  margin:0 auto; position:relative; overflow:hidden;   }
			.focus .hd{ width:100%; height:11px;  position:absolute; z-index:1; bottom:5px; text-align:center;  }
			.focus .hd ul{ display:inline-block; height:5px; padding:3px 5px; background-color:rgba(255,255,255,0.7); 
				-webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; font-size:0; vertical-align:top;
				box-sizing:content-box;
			}
			.focus .hd ul li{ display:inline-block; width:5px; height:5px; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; background:#8C8C8C; margin:0 5px;  vertical-align:top; overflow:hidden;   }
			.focus .hd ul .on{ background:#FE6C9C;  }

			.focus .bd{ position:relative; z-index:0; }
			.focus .bd li img{ width:100%; background:url(__PUBLIC__/images/loading.gif) center center no-repeat;  }
			.focus .bd li a{ -webkit-tap-highlight-color:rgba(0, 0, 0, 0); /* 取消链接高亮 */  }
			.index-item .title{ white-space:nowrap; text-overflow:ellipsis; overflow:hidden; padding-left:10px;}
		</style>
		<div id="focus" class="focus">
			<div class="hd">
				<ul></ul>
			</div>
			<div class="bd">
				<ul>
					<volist name="_CFG['banner']['config']" id="vo">
					<li><a href="{$vo.url|default='javascript:;'}"><img _src="{$vo.pic}" src="{$vo.pic}" /></a></li>
					</volist>
				</ul>
			</div>
		</div>
		<script src="__PUBLIC__/js/TouchSlide.1.1.js"></script>
		<script type="text/javascript">
			TouchSlide({ 
				slideCell:"#focus",
				titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
				mainCell:".bd ul", 
				effect:"left", 
				autoPlay:true,//自动播放
				autoPage:true, //自动分页
				switchLoad:"_src" //切换加载，真实图片路径为"_src" 
			});
		</script>
	</div>
	<div class="index-main">
		<volist name="list" id="vo">
		<div class="index-item">
			<img src="{$vo.pic}" class="product" />
			<div class="title">{$vo.title|mb_substr=0,17,'utf-8'}</div>
			<div class="price">价格：￥{$vo.price}元</div>
			<div class="btn">
				<a href="{:U('Index/product?id='.$vo['id'])}">
					进入购买<span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span>
				</a>
			</div>
		</div>
		</volist>
	</div>
	<script>
	window.shareData = {
		img: "<if condition="$shop['logo'] neq ''">{$shop.logo}<else/>{$_CFG['site']['logo']|complete_url}</if>", 
		link: "<?php 
			if($user['dist']){
				echo complete_url(U(null,http_build_query(array_merge(array('parent' => $user['id']),$_GET))));
			}else{
				echo complete_url(U(null,http_build_query($_GET)));
			}
		?>",
		title: document.title,
		desc: "这是我开的一个小店，来看看吧"
	};	
	</script>
	<include file="include/bottom" />


</body>
</html>